class Solution(object):
    def sampleStats(self, count):
        ans = [0] * 5
        ans[4] = count.index(max(count))
        total_count = sum(count)
        p = 0
        now_count = 0
        min_flag = False
        left_mid = -1
        right_mid = -1
        for i in range(256):
            if count[i]:
                if not min_flag:
                    min_flag = True
                    ans[0] = i
                ans[1] = i
                now_count += count[i]
                if total_count % 2 == 1:
                    if now_count >= (total_count + 1) // 2:
                        if left_mid == -1:
                            left_mid = i
                else:
                    if now_count >= total_count // 2:
                        if left_mid == -1:
                            left_mid = i
                    if now_count >= total_count // 2 + 1:
                        if right_mid == -1:
                            right_mid = i
                p += count[i] * i
        ans[2] = p / total_count
        if total_count % 2 == 1:
            ans[3] = left_mid
        else:
            ans[3] = (left_mid + right_mid) / 2
        return ans


data = Solution()
count = [0, 1, 3, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
         0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
         0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
         0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
         0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
         0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
         0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
print(data.sampleStats(count))
